@model VotingSystem.Models.Survey

@{
    ViewData["Title"] = "删除问卷";
}

<div class="container">
    <h1>删除问卷</h1>

    <div class="alert alert-danger">
        <h4>确定要删除这个问卷吗？</h4>
        <p>此操作不可恢复。</p>
    </div>

    <div class="card mb-4">
        <div class="card-body">
            <h5 class="card-title">@Model.Title</h5>
            <p class="card-text">@Model.Description</p>
            <div class="text-muted small">
                <p>创建者: @(Model.Creator?.UserName ?? "未知")</p>
                <p>创建时间: @Model.CreatedAt.ToString("yyyy-MM-dd HH:mm")</p>
                @if (Model.EndTime.HasValue)
                {
                    <p>截止时间: @Model.EndTime.Value.ToString("yyyy-MM-dd HH:mm")</p>
                }
                <p>状态: @(Model.IsActive ? "进行中" : "已结束")</p>
                <p>匿名: @(Model.IsAnonymous ? "是" : "否")</p>
            </div>
        </div>
    </div>

    <form asp-action="Delete">
        <input type="hidden" asp-for="Id" />
        <button type="submit" class="btn btn-danger">删除</button>
        <a asp-action="Index" class="btn btn-secondary">返回列表</a>
    </form>
</div> 